import request from '@/utils/request'
// 获取产线列表
export function productionlineList(query) {
  return request({
    url: '/mes/ipqc/base/line/list',
    method: 'get',
    params: query
  })
}
//table数据请求
export function getData(query) {
  return request({
    url: '/mes/qc/qcIpqcAll/list',
    method: 'get',
    params: query
  })
}
export function addInspection(data) {
  return request({
    url: '/mes/qc/qcIpqcAll/addQcIpqcAll',
    method: 'post',
    data: data
  })
}
// 提交
export function submitQcIpqcAll(data) {
  return request({
    url: '/mes/qc/qcIpqcAll/submitQcIpqcAll',
    method: 'post',
    data: data
  })
}

// 产线驳回
export function addQcLineRejectRecords(data) {
  return request({
    url: '/mes/qc/qcLineRejectRecords/addQcLineRejectRecords',
    method: 'post',
    data: data
  })
}
//日报表页面 
//根据报表id查询头部form
export function getForm(reportId) {
  return request({
    url: '/mes/ipqc/base/' + reportId,
    method: 'get'
  })
}


//table1数据请求
export function gettableData(query) {
  return request({
    url: '/mes/ipqc/base/inspection/head/list',
    method: 'get',
    params: query
  })
}

//table2数据请求
export function getTimeData(query) {
  return request({
    url: '/mes/ipqc/inspection/detail/listByInspectioId',
    method: 'get',
    params: query
  })
}

// 产线明细
export function getLineProductInfo(data) {
  return request({
    url: '/mes/qc/qcLineSubmissionDetails/addQcLineSubmissionDetails',
    method: 'post',
    data: data
  })
}
// 驳回详情
export function getIpqcAllReject(data) {
  return request({
    url: '/mes/qc/qcIpqcAll/getIpqcAllInfo',
    method: 'post',
    data: data
  })
}

export function getQcIpqcallInspectionRecords(id) {
  return request({
    url: '/mes/qc/qcIpqcAll/getQcIpqcallInspectionRecords/' + id,
    method: 'get'
  })
}
export function getIpqcAllInspectInfo(id) {
  return request({
    url: '/mes/qc/qcIpqcAll/getIpqcAllInspectInfo/' + id,
method: 'get'
  })
}